Skip to content

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed#25027

Merged
yxieca merged 1 commit into
sonic-net:masterfrom
Gfrom2016:bmc-skip-swss-gate-when-disabled
Jul 2, 2026
Merged

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed#25027
yxieca merged 1 commit into
sonic-net:masterfrom
Gfrom2016:bmc-skip-swss-gate-when-disabled

Conversation

@Gfrom2016

@Gfrom2016 Gfrom2016 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description of PR

BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC. swss/syncd are intentionally not running there, so the existing readiness gate in tests/common/config_reload.py::config_system_checks_passed() ΓÇö which waits for systemctl show swss.service --property ActiveState to be "active" ΓÇö never passes.

Result: every reload-using test on BMC (e.g. platform_tests/test_reload_config.py::test_reload_configuration, ::test_reload_configuration_checks) times out the full 360 s window and fails with:

AssertionError: System checks did not pass within the allotted time after config reload.

This PR short-circuits the swss readiness gate when duthost.is_bmc() is true.

SonicHost.is_bmc() is the canonical BMC-detection helper already used by tests/bmc/conftest.py, tests/cacl/test_cacl_function.py, tests/process_monitoring/test_critical_process_monitoring.py, and is implemented as a single cached lookup (self._facts.get('router_type', '') == 'NetworkBmc') ΓÇö no extra shell call, no parser risk. Behavior on every non-BMC device is unchanged.

Verified manifestation

R3 baseline on Komodo BMC (build internal.161861823-bff76049fe, 2026-04-28):

Test Runtime Result Error
test_reload_configuration[host1-komodo-bmc] 424 s failure AssertionError: System checks did not pass within the allotted time after config reload.
test_reload_configuration_checks[host1-komodo-bmc] 614 s failure AssertionError: System checks did not pass within the allotted time after config reload on Delayed services: []

Both runtimes are dominated by the 360 s wait_until window where config_system_checks_passed() returns False every 20 s on the swss check.

Summary

Fixes #

Type of change

  • Bug fix

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Stop wasting 6+ minutes per reload-using test on BMC waiting for a service that is intentionally not running.

How did you do it?

Wrapped the existing multi-asic / single-asic swss readiness block with if duthost.is_bmc(): ... else: <existing block>. No other changes.

How did you verify/test it?

  • python3 -m py_compile tests/common/config_reload.py clean.
  • Static review against the failure data above.
  • CI will exercise the reload tests on non-BMC platforms.
  • Will re-verify test_reload_configuration[host1-komodo-bmc] and ::test_reload_configuration_checks on Komodo BMC after merge.

Any platform specific information?

Only affects the path where DEVICE_METADATA.localhost.type == 'NetworkBmc'. No-op everywhere else.

Supported testbed topology if it's a new test case?

N/A ΓÇö helper change.

Documentation

N/A

Workitem link: https://msazure.visualstudio.com/One/_workitems/edit/37906237

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Gfrom2016
Gfrom2016 force-pushed the bmc-skip-swss-gate-when-disabled branch from 0e70730 to 156c3a9 Compare June 2, 2026 05:00
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Gfrom2016
Gfrom2016 force-pushed the bmc-skip-swss-gate-when-disabled branch from 156c3a9 to 2a058b6 Compare June 2, 2026 05:46
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Gfrom2016 Gfrom2016 changed the title [BMC] Skip swss readiness gate in config_system_checks_passed when swss FEATURE is disabled [BMC] Skip swss readiness gate in config_system_checks_passed on BMC Jun 2, 2026
@Gfrom2016 Gfrom2016 changed the title [BMC] Skip swss readiness gate in config_system_checks_passed on BMC [BMC] Skip swss readiness gate in config_system_checks_passed Jun 2, 2026
@Gfrom2016 Gfrom2016 changed the title [BMC] Skip swss readiness gate in config_system_checks_passed [BMC][config_reload] Skip swss readiness gate in config_system_checks_passed Jun 2, 2026
BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no
front-side ASIC. swss/syncd are intentionally not running on BMC, so the
existing readiness gate in config_system_checks_passed() - which waits for
'systemctl show swss.service --property ActiveState' == 'active' - never
passes. Every reload-using test (e.g.
platform_tests/test_reload_config.py::test_reload_configuration[_checks])
times out after 360s with:

    AssertionError: System checks did not pass within the allotted time
    after config reload.

Use the cached SonicHost.is_bmc() helper (same pattern as tests/bmc/conftest.py,
cacl/test_cacl_function.py, process_monitoring/test_critical_process_monitoring.py)
to short-circuit the swss check on BMC. No shell call, no new dependency,
behavior unchanged on every non-BMC device.

Tracking: PBI 37906237.
Signed-off-by: zitingguo <zitingguo@microsoft.com>
@Gfrom2016
Gfrom2016 force-pushed the bmc-skip-swss-gate-when-disabled branch from 2a058b6 to 33478ba Compare June 2, 2026 05:57
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yxieca

yxieca commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: correct, minimally-scoped BMC bug fix.

The swss/orchagent readiness gate is structurally unsatisfiable on BMC (router_type == NetworkBmc, no front ASIC, swss/syncd intentionally not running), so it can only time out the full window. The bypass is gated on the canonical cached is_bmc() helper (no shell call), the non-BMC path is unchanged, and BMC still validates systemctl is-system-running and delayed services — so it is not a hollow pass.

One optional follow-up (non-blocking): if BMC testing runs on any release branch, consider a backport, since the back-port checkboxes are currently unset.

Reviewed by AI agent on behalf of Ying.

@yxieca
yxieca merged commit b4b5211 into sonic-net:master Jul 2, 2026
26 of 28 checks passed
@yxieca

yxieca commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

The VPP test failure was addressed by #25820

@mssonicbld

Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202608: Azure/sonic-mgmt.msft#1274

MahekPatel-2403 pushed a commit to MahekPatel-2403/sonic-mgmt that referenced this pull request Jul 4, 2026
…_passed (sonic-net#25027)

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed (sonic-net#25027)

What: In tests/common/config_reload.py::config_system_checks_passed(), short-circuits the swss/orchagent readiness gate when duthost.is_bmc() is true; the existing multi-asic/single-asic swss block is otherwise unchanged.
Why: BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC and intentionally do not run swss/syncd, so the swss ActiveState=="active" gate can never pass. Every reload-using test on BMC (e.g. test_reload_configuration, test_reload_configuration_checks) then times out the full 360s window and fails.
How: Wraps the swss readiness block in `if duthost.is_bmc(): skip else: <existing block>`, gated on the canonical cached is_bmc() helper (router_type == 'NetworkBmc', no extra shell call). BMC still validates systemctl is-system-running and delayed services; non-BMC behavior is unchanged.
Testing: python3 -m py_compile clean; static review against Komodo BMC failure data. CodeQL, Semgrep, DCO, EasyCLA passing. Approved by yxieca.

Fixes #<issue>

Signed-off-by: zitingguo <zitingguo@microsoft.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jul 16, 2026
…_passed (sonic-net#25027)

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed (sonic-net#25027)

What: In tests/common/config_reload.py::config_system_checks_passed(), short-circuits the swss/orchagent readiness gate when duthost.is_bmc() is true; the existing multi-asic/single-asic swss block is otherwise unchanged.
Why: BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC and intentionally do not run swss/syncd, so the swss ActiveState=="active" gate can never pass. Every reload-using test on BMC (e.g. test_reload_configuration, test_reload_configuration_checks) then times out the full 360s window and fails.
How: Wraps the swss readiness block in `if duthost.is_bmc(): skip else: <existing block>`, gated on the canonical cached is_bmc() helper (router_type == 'NetworkBmc', no extra shell call). BMC still validates systemctl is-system-running and delayed services; non-BMC behavior is unchanged.
Testing: python3 -m py_compile clean; static review against Komodo BMC failure data. CodeQL, Semgrep, DCO, EasyCLA passing. Approved by yxieca.

Fixes #<issue>

Signed-off-by: zitingguo <zitingguo@microsoft.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jul 16, 2026
…_passed (sonic-net#25027)

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed (sonic-net#25027)

What: In tests/common/config_reload.py::config_system_checks_passed(), short-circuits the swss/orchagent readiness gate when duthost.is_bmc() is true; the existing multi-asic/single-asic swss block is otherwise unchanged.
Why: BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC and intentionally do not run swss/syncd, so the swss ActiveState=="active" gate can never pass. Every reload-using test on BMC (e.g. test_reload_configuration, test_reload_configuration_checks) then times out the full 360s window and fails.
How: Wraps the swss readiness block in `if duthost.is_bmc(): skip else: <existing block>`, gated on the canonical cached is_bmc() helper (router_type == 'NetworkBmc', no extra shell call). BMC still validates systemctl is-system-running and delayed services; non-BMC behavior is unchanged.
Testing: python3 -m py_compile clean; static review against Komodo BMC failure data. CodeQL, Semgrep, DCO, EasyCLA passing. Approved by yxieca.

Fixes #<issue>

Signed-off-by: zitingguo <zitingguo@microsoft.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
ssithaia-ebay pushed a commit to ssithaia-ebay/sflow-yang-sonic-mgmt that referenced this pull request Jul 21, 2026
…_passed (sonic-net#25027)

[BMC][config_reload] Skip swss readiness gate in config_system_checks_passed (sonic-net#25027)

What: In tests/common/config_reload.py::config_system_checks_passed(), short-circuits the swss/orchagent readiness gate when duthost.is_bmc() is true; the existing multi-asic/single-asic swss block is otherwise unchanged.
Why: BMC devices (DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC and intentionally do not run swss/syncd, so the swss ActiveState=="active" gate can never pass. Every reload-using test on BMC (e.g. test_reload_configuration, test_reload_configuration_checks) then times out the full 360s window and fails.
How: Wraps the swss readiness block in `if duthost.is_bmc(): skip else: <existing block>`, gated on the canonical cached is_bmc() helper (router_type == 'NetworkBmc', no extra shell call). BMC still validates systemctl is-system-running and delayed services; non-BMC behavior is unchanged.
Testing: python3 -m py_compile clean; static review against Komodo BMC failure data. CodeQL, Semgrep, DCO, EasyCLA passing. Approved by yxieca.

Fixes #<issue>

Signed-off-by: zitingguo <zitingguo@microsoft.com>
Signed-off-by: ssithaia-ebay <ssithaian@ebay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants